<html>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>录入</title>
    <head>
        <link href="resources/styles/cms.css" rel="stylesheet" type="text/css">
        <script language="javascript">
            function reg(){
				if (regform.user_name.value == "") {
                    alert("请输入用户名");
                    return false;
                }
                if (regform.user_pass.value == "") {
                    alert("请输入密码");
                    return false;
                }
                if (regform.user_pass1.value != regform.user_pass.value) {
                    alert("密码输入不一致");
                    return false;
                }
				
				return true;
            }
        </script>
        <style type="text/css">
            body {
                background-image: url(resources/images/tab_shadow.gif);
                background-attachment: fixed;
                background-repeat: repeat-x;
            }
        </style>
    </head>
    <body>
        <form action="<{$domain}>?act=admin.insert" method="post" name="regform" onSubmit="return reg();">
            <TABLE width="100%" border=0 align="center" cellPadding=2 cellSpacing=1 class=color-tabletrim>
                <TR>
                    <TD height="20" class="j">
                        <img src="resources/images/file.gif" width="14" height="14" border="0" align="absmiddle" />&nbsp;&nbsp;添加管理员
                    </TD>
                </TR>
                <tr class="e">
                    <td nowrap="nowrap" height="20">
                        <table width="100%" border="0" cellpadding="2" cellspacing="0">
                            <tr>
                            	<td align="right" width="91" class="c_lick">用户：</td>
                                <td class="c_lick" bgColor="#f8f8f8">
                                    <input name="user_name" type="text" class="text" style="width:150px">
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="91" class="c_lick">密码：</td>
                                <td class="c_lick" bgColor="#f8f8f8">
                                    <input name="user_pass" type="password" class="text" id="user_pass" style="width:150px">
                                </td>
                            </tr>
                            <tr>
                                <td align="right" width="91" class="c_lick">确认密码：</td>
                                <td class="c_lick" bgColor="#f8f8f8">
                                    <input name="user_pass1" type="password" class="text" id="user_pass1" style="width:150px">
                                </td>
                            </tr>
							<tr>
                                <td align="right" width="91" class="c_lick">部门：</td>
                                <td class="c_lick" bgColor="#f8f8f8">
                                	<select name="role">
										<option value="0">请选择部门</option>
										<{section name=role loop=$out.role}>
										<option value="<{$out.role[role].role_id}>"><{$out.role[role].role_name}></option>
										<{/section}>
                                	</select>
                                </td>
                            </tr>
							<tr>
                                <td align="right" width="91" class="c_lick">超级管理员：</td>
                                <td class="c_lick" bgColor="#f8f8f8">
                                    <input name="is_admin" type="checkbox" value="1"/>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top" width="91" class="c_lick">权限：</td>
                                <td class="c_lick" bgColor="#f8f8f8">
                                </td>
                            </tr>
                            <tr>
                                <td class="c_lick">
                                    &nbsp;
                                </td>
                                <td colspan="2" class="c_lick" bgColor="#f8f8f8">
                                    <{foreach from=$out.data item=d}>
                                    &nbsp;&nbsp;<b><{$d.name}></b>
                                    <br>
                                    <{foreach from=$d.menus item=v}>
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    <input id="priv[]" name="priv[]" onClick="" type="checkbox" value="<{$v.id}>"><{$v.name}>
                                    <br>
                                    <{/foreach}> 
                                    <{/foreach}>
                                </td>
                            </tr>
                            <tr>
                                <td class="c_lick" height="20" colspan="2">
                                    <input class=button type="submit" name="submit" value="保存">
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </TABLE>
        </form>
    </body>
</html>